package com.my.hotel.service.impl;

import com.my.hotel.entity.Order;
import com.my.hotel.mapper.OrderMapper;
import com.my.hotel.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;
    @Override
    public List<Order> getList() {
        return orderMapper.getList();
    }

    @Override
    public void changeStatus(Order order) {
        orderMapper.changeStatus(order);
    }

    @Override
    public List<Order> getMyOrder(Integer userId) {
        return orderMapper.getMyOrder(userId);
    }
}
